package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.entity.NursingProject;
import com.zzyl.vo.NursingProjectVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * 护理项目Mapper接口
 */
@Mapper
public interface NursingProjectMapper {

    Page<NursingProject> selectByPage(String name, Integer status);

    void insert(NursingProject nursingProject);

    void update(NursingProject nursingProject);

    NursingProject findById(long id);

    int deleteById(long id);

    @Select("select * from nursing_project")
    List<NursingProjectVo> selectAll();


    @Update("update nursing_project set status = #{status} where id = #{id}")
    void isEnable(Long id, Integer status);
}